

<%@ page import="org.grails.checkout.GoogleOrder" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'googleOrder.label', default: 'GoogleOrder')}" />
        <title><g:message code="default.edit.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.edit.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${googleOrderInstance}">
            <div class="errors">
                <g:renderErrors bean="${googleOrderInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${googleOrderInstance?.id}" />
                <g:hiddenField name="version" value="${googleOrderInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="buyerEmail"><g:message code="googleOrder.buyerEmail.label" default="Buyer Email" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: googleOrderInstance, field: 'buyerEmail', 'errors')}">
                                    <g:textField name="buyerEmail" value="${googleOrderInstance?.buyerEmail}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="lastFinStatus"><g:message code="googleOrder.lastFinStatus.label" default="Last Fin Status" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: googleOrderInstance, field: 'lastFinStatus', 'errors')}">
                                    <g:textField name="lastFinStatus" value="${googleOrderInstance?.lastFinStatus}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="lastFulStatus"><g:message code="googleOrder.lastFulStatus.label" default="Last Ful Status" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: googleOrderInstance, field: 'lastFulStatus', 'errors')}">
                                    <g:textField name="lastFulStatus" value="${googleOrderInstance?.lastFulStatus}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="lastUpdateTime"><g:message code="googleOrder.lastUpdateTime.label" default="Last Update Time" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: googleOrderInstance, field: 'lastUpdateTime', 'errors')}">
                                    <g:datePicker name="lastUpdateTime" precision="day" value="${googleOrderInstance?.lastUpdateTime}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="merchantId"><g:message code="googleOrder.merchantId.label" default="Merchant Id" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: googleOrderInstance, field: 'merchantId', 'errors')}">
                                    <g:textField name="merchantId" value="${googleOrderInstance?.merchantId}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="notifications"><g:message code="googleOrder.notifications.label" default="Notifications" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: googleOrderInstance, field: 'notifications', 'errors')}">
                                    
<ul>
<g:each in="${googleOrderInstance?.notifications?}" var="n">
    <li><g:link controller="googleOrderNotification" action="show" id="${n.id}">${n?.encodeAsHTML()}</g:link></li>
</g:each>
</ul>
<g:link controller="googleOrderNotification" action="create" params="['googleOrder.id': googleOrderInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'googleOrderNotification.label', default: 'GoogleOrderNotification')])}</g:link>

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="orderAmount"><g:message code="googleOrder.orderAmount.label" default="Order Amount" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: googleOrderInstance, field: 'orderAmount', 'errors')}">
                                    <g:textField name="orderAmount" value="${googleOrderInstance?.orderAmount}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="orderNumber"><g:message code="googleOrder.orderNumber.label" default="Order Number" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: googleOrderInstance, field: 'orderNumber', 'errors')}">
                                    <g:textField name="orderNumber" value="${googleOrderInstance?.orderNumber}" />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
